﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SupervisorPage.aspx.cs" Inherits="utd_hrrs.SupervisorPage" culture="auto" meta:resourcekey="PageResource1" uiculture="auto" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript" src="http://konami-js.googlecode.com/svn/trunk/konami.js"></script>
<script type="text/javascript">
    <script type="text/javascript" src="http://konami-js.googlecode.com/svn/trunk/konami.js"></script>
<script type="text/javascript">
    konami = new Konami()
    konami.load("javascript:var%20s%20=%20document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='http://erkie.github.com/asteroids.min.js';void(0);");
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:UTD_HRRSConnectionString %>" 
            onselecting="SqlDataSource1_Selecting" 
            SelectCommand="SELECT * FROM [MAINTENANCE]" 
            DeleteCommand="DELETE FROM [MAINTENANCE] WHERE [MAINT_ID] = @MAINT_ID" 
            InsertCommand="INSERT INTO [MAINTENANCE] ([MAINT_ID], [DESCRIPTION], [SCHEDULE_DAY], [INV_ID]) VALUES (@MAINT_ID, @DESCRIPTION, @SCHEDULE_DAY, @INV_ID)" 
            UpdateCommand="UPDATE [MAINTENANCE] SET [DESCRIPTION] = @DESCRIPTION, [SCHEDULE_DAY] = @SCHEDULE_DAY, [INV_ID] = @INV_ID WHERE [MAINT_ID] = @MAINT_ID">
            <DeleteParameters>
                <asp:Parameter Name="MAINT_ID" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="DESCRIPTION" Type="String" />
                <asp:Parameter DbType="Date" Name="SCHEDULE_DAY" />
                <asp:Parameter Name="INV_ID" Type="Int32" />
                <asp:Parameter Name="MAINT_ID" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="MAINT_ID" Type="Int32" />
                <asp:Parameter Name="DESCRIPTION" Type="String" />
                <asp:Parameter DbType="Date" Name="SCHEDULE_DAY" />
                <asp:Parameter Name="INV_ID" Type="Int32" />
            </InsertParameters>
        </asp:SqlDataSource>
    
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:UTD_HRRSConnectionString %>" 
            onselecting="SqlDataSource2_Selecting" 
            SelectCommand="SELECT * FROM [REPAIR]" 
            DeleteCommand="DELETE FROM [REPAIR] WHERE [REPAIR_ID] = @REPAIR_ID" 
            InsertCommand="INSERT INTO [REPAIR] ([REPAIR_ID], [SCHEDULE_DAY], [PROBLEM], [INV_ID]) VALUES (@REPAIR_ID, @SCHEDULE_DAY, @PROBLEM, @INV_ID)" 
            UpdateCommand="UPDATE [REPAIR] SET [SCHEDULE_DAY] = @SCHEDULE_DAY, [PROBLEM] = @PROBLEM, [INV_ID] = @INV_ID WHERE [REPAIR_ID] = @REPAIR_ID">
            <DeleteParameters>
                <asp:Parameter Name="REPAIR_ID" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter DbType="Date" Name="SCHEDULE_DAY" />
                <asp:Parameter Name="PROBLEM" Type="String" />
                <asp:Parameter Name="INV_ID" Type="Int32" />
                <asp:Parameter Name="REPAIR_ID" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="REPAIR_ID" Type="Int32" />
                <asp:Parameter DbType="Date" Name="SCHEDULE_DAY" />
                <asp:Parameter Name="PROBLEM" Type="String" />
                <asp:Parameter Name="INV_ID" Type="Int32" />
            </InsertParameters>
        </asp:SqlDataSource>
        <br />
        <asp:Button ID="Button3" runat="server" onclick="Button3_Click" 
            Text="Go back to Supervisor page..." />
        <br />
        <br />
        <asp:Label ID="Label1" runat="server" Text="Maintenance"></asp:Label>
    
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1"     
            DataKeyNames="MAINT_ID" AllowSorting="True">
            <Columns>
                <asp:CommandField ShowDeleteButton="True" />
                <asp:BoundField DataField="MAINT_ID" HeaderText="MAINT_ID" ReadOnly="True" 
                    SortExpression="MAINT_ID" />
                <asp:BoundField DataField="DESCRIPTION" HeaderText="DESCRIPTION" 
                    SortExpression="DESCRIPTION" />                
                <asp:BoundField DataField="SCHEDULE_DAY" HeaderText="SCHEDULE_DAY" 
                    SortExpression="SCHEDULE_DAY" />
                <asp:BoundField DataField="INV_ID" HeaderText="INV_ID" 
                    SortExpression="INV_ID" />
            </Columns>
        </asp:GridView>
        <br />
        <asp:Label ID="Label2" runat="server" BackColor="#CC0000" BorderColor="Red" 
            ForeColor="White" Text="All fields must be entered!" Visible="False"></asp:Label>
        <br />
        <br />
        <asp:TextBox ID="TextBox3" runat="server" ReadOnly="True">Description</asp:TextBox>
        <asp:TextBox ID="TextBox9" runat="server"></asp:TextBox>
        <br />  
        <asp:TextBox ID="TextBox6" runat="server" ReadOnly="True">Schedule_Day</asp:TextBox>
        <asp:TextBox ID="TextBox12" runat="server"></asp:TextBox>
        <br />
        <asp:TextBox ID="TextBox5" runat="server" ReadOnly="True">Inv_ID</asp:TextBox>
        <asp:TextBox ID="TextBox11" runat="server"></asp:TextBox>
        <br />
        <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
            Text="Submit Maintenance Request" />
        <br />
        <br />
        <br />
        <asp:Label ID="Label3" runat="server" Text="Repair"></asp:Label>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="REPAIR_ID" DataSourceID="SqlDataSource2" AllowSorting="True">
            <Columns>
                <asp:CommandField ShowDeleteButton="True" />
                <asp:BoundField DataField="REPAIR_ID" HeaderText="REPAIR_ID" ReadOnly="True" 
                    SortExpression="REPAIR_ID" />
                <asp:BoundField DataField="SCHEDULE_DAY" HeaderText="SCHEDULE_DAY" 
                    SortExpression="SCHEDULE_DAY" />
                <asp:BoundField DataField="PROBLEM" HeaderText="PROBLEM" 
                    SortExpression="PROBLEM" />
                <asp:BoundField DataField="INV_ID" HeaderText="INV_ID" 
                    SortExpression="INV_ID" />
            </Columns>
        </asp:GridView>
        <br />
        <asp:Label ID="Label4" runat="server" BackColor="#CC0000" ForeColor="White" 
            Text="All fields must be entered!" Visible="False"></asp:Label>
        <br />
        <br />
        <asp:TextBox ID="TextBox14" runat="server" ReadOnly="True">Schedule_Day</asp:TextBox>
        <asp:TextBox ID="TextBox18" runat="server"></asp:TextBox>
        <br />
        <asp:TextBox ID="TextBox15" runat="server" ReadOnly="True">Problem</asp:TextBox>
        <asp:TextBox ID="TextBox19" runat="server"></asp:TextBox>
        <br />
        <asp:TextBox ID="TextBox16" runat="server" ReadOnly="True">Inv_ID</asp:TextBox>
        <asp:TextBox ID="TextBox20" runat="server"></asp:TextBox>
        <br />
        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" 
            Text="Submit Repair Request" />
        <br />
    
    </div>
    </form>
</body>
</html>
